﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddDescCategoria.aspx.cs" Inherits="NewTierra.Pages.AddDescCategoria" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">

    <link rel="shortcut icon" href="../../images/Icones/favicon.ico" type="image/x-icon" />

    <link href="../../Styles/jquery_notification.css" rel="stylesheet" />

    <script type="text/javascript" src="../../Scripts/jquery_notification_v.1.js"></script>

    <link href="../../Styles/EstiloGeral.css" rel="stylesheet" type="text/css" />

    <title></title>

    <style type="text/css">
        #CategDesc
        {
            height: 297px;
            width: 690px;
            padding: 10px;
        }

            #CategDesc .GridDesc
            {
                float: left;
                height: 245px;
                width: 223px;
                margin-top: 10px;
            margin-left: 10px;
        }

            #CategDesc .FormCadastro
            {
                float: left;
                width: 437px;
                height: 257px;
            }
    </style>    

</head>
<body>

    <form id="form1" runat="server">

        <script type="text/javascript">
            function showAutoCloseMessage(MsgsExc) {
                showNotification({
                    message: MsgsExc,
                    autoClose: true,
                    type: "success",
                    duration: 5
                });
            }
    </script>

        <div id="CategDesc">

            <asp:ScriptManager ID="ScriptManager1" runat="server" />

            <asp:UpdatePanel ID="UpdatePanelCategDesc" runat="server">
                <ContentTemplate>

                    <div class="FormCadastro">

                        <fieldset style="height: 250px">
                            <legend>Cadastrar Descrição</legend>

                            <p class="paragrafo">
                                <asp:TextBox ID="txtRemarkDescCateg" runat="server" Text="" MaxLength="500" placeholder="Remark" TextMode="MultiLine" Height="171px" Width="408px" />
                            </p>
                            <p class="paragrafo">
                                <asp:Button ID="btnSalvarDesc" runat="server" Text="Salvar" CssClass="btnsGeral" OnClick="btnSalvarDesc_Click" /> 
                                <asp:Label ID="lblMsgCadDesc" runat="server" Text="" CssClass="MsgErro" />
                            </p>

                        </fieldset>

                    </div>

                    <div class="GridDesc">

                         <asp:GridView ID="GridDesc" runat="server" AllowPaging="True"
                            AutoGenerateColumns="False" GridLines="None" CssClass="mGrid" PagerStyle-CssClass="pgr"
                            AlternatingRowStyle-CssClass="alt" EmptyDataText="Não existe categoria com tarifa para esse Supplier."
                            Height="16px" PageSize="8" OnPageIndexChanging="PaginarDados"
                             OnSelectedIndexChanged="GridDesc_SelectedIndexChanged">
                            <AlternatingRowStyle CssClass="alt"></AlternatingRowStyle>
                             <SelectedRowStyle CssClass="SelectedRowStyle" />
                            <Columns>                                

                                <asp:BoundField DataField="Tarif_categoria_id" HeaderText="IDCateg">
                                    <ItemStyle CssClass="invisible" />
                                    <FooterStyle CssClass="invisible" />
                                    <HeaderStyle CssClass="invisible" />
                                </asp:BoundField>

                                <asp:BoundField DataField="Tarif_categoria_nome" HeaderText="Categoria" />

                                <asp:CommandField ShowSelectButton="True" ButtonType="Image" SelectImageUrl="~/images/Icones/edit.png" />

                                <asp:TemplateField HeaderText="">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="ExluirRemark"
                                            runat="server" CommandArgument='<%# Eval("Tarif_categoria_id") %>'
                                            OnCommand="ExluirRemark"
                                            ToolTip="Excluir Remark" ImageUrl="~/images/Icones/delete.png" />
                                    </ItemTemplate>
                                    <HeaderStyle Wrap="False" />
                                    <ItemStyle Wrap="False" />
                                </asp:TemplateField>

                            </Columns>

                            <PagerStyle CssClass="pgr"></PagerStyle>

                        </asp:GridView>

                    </div>


                </ContentTemplate>
            </asp:UpdatePanel>

        </div>

    </form>

</body>
</html>
